package com.springbootbase.springbootproject.utils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;


public class JsonUtil {

    public static Map nioMethod(String filename) throws IOException {
        File file = new File(filename);
        String jsonString = new String(Files.readAllBytes(Paths.get(file.getPath())));
        Map map = JSONObject.parseObject(jsonString);
        return map;
    }
}


